import React from "react";
import Layout from "@/layout";
import { RouteObject } from "../interface";
import lazyLoad from "../lazyLoad";

// echarts 模块
const echartsRouter: Array<RouteObject> = [
	{
		element: <Layout />,
		meta: {
			title: "Echarts"
		},
		children: [
			{
				path: "/echarts/lineChart",
				element: lazyLoad(React.lazy(() => import("@/pages/echarts/lineChart/index"))),
				meta: {
					title: "折线图",
					key: "lineChart"
				}
			},
			{
				path: "/echarts/barChart",
				element: lazyLoad(React.lazy(() => import("@/pages/echarts/barChart/index"))),
				meta: {
					title: "柱状图",
					key: "barChart"
				}
			}
		]
	}
];

export default echartsRouter;
